<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员个人信息</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}">
</head>
<body>
    <div class="admin-container">
        <h1>管理员个人信息</h1>
        <div class="navbar">
            <a href="{{ url_for('admin_dashboard') }}">主页</a>
            <a href="{{ url_for('admin_profile') }}">个人信息</a>
            <a href="{{ url_for('admin_logout') }}">登出</a>
            <a href="{{ url_for('admin_login') }}">切换账号</a>
        </div>

        <!-- 当前时间显示 -->
        <div class="current-time">
            <p id="current-time"></p>
        </div>

        {% with messages = get_flashed_messages() %}
            {% if messages %}
                <ul>
                {% for message in messages %}
                    <li>{{ message }}</li>
                {% endfor %}
                </ul>
            {% endif %}
        {% endwith %}

        <form action="{{ url_for('admin_profile') }}" method="post">
            <label for="username">用户名:</label>
            <input type="text" id="username" name="username" value="{{ admin[0] }}" readonly>

            <label for="full_name">姓名:</label>
            <input type="text" id="full_name" name="full_name" value="{{ admin[1] }}" required>

            <label for="email">电子邮件:</label>
            <input type="email" id="email" name="email" value="{{ admin[2] }}" required>

            <label for="role">角色:</label>
            <input type="text" id="role" name="role" value="{{ admin[3] }}" required>

            <label for="password">新密码 (如果需要修改):</label>
            <input type="password" id="password" name="password">

            <button type="submit">更新信息</button>
        </form>
    </div>

    <script src="{{ url_for('static', filename='js/custom.js') }}"></script>
</body>
</html>
